package LeetCodeP;

public class Soluction1221 {

    public static int balancedStringSplit(String S) {
        char[] charArr = S.toCharArray();
        StringBuffer s = new StringBuffer();

        int count=0;
        for (int i=0;i<charArr.length;i++){
            for (int j=i;j<charArr.length;j++){
                System.out.println("i:"+charArr[i]);
                System.out.println("j:"+charArr[j]);
                /*if (charArr[i]=='R'&&charArr[j]=='L'||charArr[i]=='L'&&charArr[j]=='R'){
                    count++;
                }*/
            }


        }
        System.out.println(count);
        return count;
    }

    public static void main(String[] args) {
        String S="RLRRLLRLRL";
        balancedStringSplit(S);

    }

}
